#!/bin/sh
CWD=$(pwd)
CORE="glibc binutils gcc binutils glibc gmp mpfr oprofile ncurses readline zlib kernel "
PKGS=${CORE}$(ls system/*|sed '/:/!d;s#system/##g;s/://g')
for i in $PKGS; do
  if [ -d system/$i ]; then
    cd system/$i || exit 1
    sh ../../build.sh install || exit 1
  fi
  cd $CWD || exit 1
done
